namespace cbooc

import Boo.Lang.Compiler
import Boo.Lang.Useful.CommandLine from Boo.Lang.Useful

class CommandLine(AbstractCommandLine):
	
	[Option("Output assembly", LongForm: "out")]
	public Output as string
	
	[Option("Reference", ShortForm: "r", LongForm: "ref")]
	public References = []
	
	[Option("Target type (library, exe, winexe)", ShortForm: "t", LongForm: "target")]
	public TargetString = "library"
	
	Target:
		get:
			if TargetString == "library": return CompilerOutputType.Library
			if TargetString == "exe": return CompilerOutputType.ConsoleApplication
			return CompilerOutputType.WindowsApplication
	
	[Option("Concurrent Pipeline", ShortForm: "c", LongForm: "concurrent")]
	public Concurrent = true
	
	[Option("Benchmark Performance", ShortForm: "b", LongForm: "benchmark")]
	public Benchmark = false
	
	[Argument("Source File")]
	public Sources = []
	
	IsValid:
		get:
			return len(Sources) > 0 and Output is not null
			
	def constructor(args as (string)):
		self.Parse(args)


